package com.hnevc.gui;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class NullLayoutDemo extends JFrame{
	JPanel p;
	JButton btnOk;
	public NullLayoutDemo(){
		super("NULL 布局");
		
		p = new JPanel();
		p.setLayout(null);
		
		btnOk = new JButton("OK");
		btnOk.setBounds(100, 100, 60,30);
		p.add(btnOk);
		this.add(p);
		this.setLocation(200, 200);
		this.setSize(200,200);
		this.setVisible(true);
	}
	public static void main(String[] args) {
		new NullLayoutDemo();
	}

}
